<html>
<head><meta charset="utf-8"><title>Is there an equivalent of opt_item_name for Resolver? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20equivalent.20of.20opt_item_name.20for.20Resolver.3F.html">Is there an equivalent of opt_item_name for Resolver?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233050267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20equivalent%20of%20opt_item_name%20for%20Resolver%3F/near/233050267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20equivalent.20of.20opt_item_name.20for.20Resolver.3F.html#233050267">(Apr 04 2021 at 02:42)</a>:</h4>
<p>Is there a way to get the name of a DefId without having to first construct a TyCtxt?</p>



<a name="233050277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20equivalent%20of%20opt_item_name%20for%20Resolver%3F/near/233050277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20equivalent.20of.20opt_item_name.20for.20Resolver.3F.html#233050277">(Apr 04 2021 at 02:42)</a>:</h4>
<p>I would expect it to be on <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/creader/struct.CStore.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_metadata/creader/struct.CStore.html</a> somewhere but I don't see it</p>



<a name="233050292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20equivalent%20of%20opt_item_name%20for%20Resolver%3F/near/233050292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20equivalent.20of.20opt_item_name.20for.20Resolver.3F.html#233050292">(Apr 04 2021 at 02:43)</a>:</h4>
<p>I guess <code>DefPath::to_string_no_crate_verbose</code> is sort of close? let me try that</p>



<a name="233050720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20equivalent%20of%20opt_item_name%20for%20Resolver%3F/near/233050720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20equivalent.20of.20opt_item_name.20for.20Resolver.3F.html#233050720">(Apr 04 2021 at 02:52)</a>:</h4>
<p>ok yay that worked <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>